package com.ljx.blog.security.config;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.ljx.blog.article.typehandler.ArticleTypeHandler;
import com.ljx.blog.article.typehandler.custom.TagList;
import com.ljx.blog.user.typehandler.TenantTypeHandler;
import com.ljx.blog.user.typehandler.custom.ThemeRespList;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-10-13  15:32
 */
@Configuration
public class MyBatisUserConfig {

    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return configuration -> {
            configuration.getTypeHandlerRegistry().register(TagList.class, ArticleTypeHandler.class);
            configuration.getTypeHandlerRegistry().register(ThemeRespList.class, TenantTypeHandler.class);
        };
    }
}
